package is.client.controller.command;

import is.client.Main;
import is.common.interfaces.Command;

import java.io.IOException;

/**
 * @author aspr0
 *         Date: 29.04.12
 *         Time: 5:48
 */
public class DisconnectCommand implements Command
{
    @Override
    public void execute()
    {
        try
        {
            Main.getController().getModel().deactivate();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }

        Main.getController().getUserInterface().exposeConnectionBroken();
    }
}
